package edu.jd.software.web.backend.controller;

import edu.jd.software.web.backend.common.api.CommonPage;
import edu.jd.software.web.backend.common.api.CommonResult;
import edu.jd.software.web.backend.mbg.model.UmsRole;
import edu.jd.software.web.backend.service.UmsRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/role")
public class UmsRoleController {

    @Autowired
    private UmsRoleService roleService;

    @PostMapping("/create")
    public CommonResult create(@RequestBody UmsRole entity) {

        return CommonResult.success(null);
    }

    @PostMapping("/update/{id}")
    public CommonResult update(@PathVariable Long id, @RequestBody UmsRole entity) {

        return CommonResult.success(null);
    }

    @PostMapping("/delete/{id}")
    public CommonResult delete(@PathVariable Long id) {

        return CommonResult.success(null);
    }

    @GetMapping("/select/{id}")
    public CommonResult<UmsRole> select(@PathVariable Long id) {
        return CommonResult.success(null);
    }


    @GetMapping("/listAll")
    public CommonResult<CommonPage<UmsRole>> listAll(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                      @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
        return CommonResult.success(CommonPage.restPage(null));
    }


    //@GetMapping("/subList")
    //获得拥有menuId权限的角色信息


    //@GetMapping("/groupList")
    //统计每个menu有多少个角色信息


    //@GetMapping("/selectWithMenuList")
    //查询id角色下的menu信息


}
